var uart = require('uart');

var msgbuf = [97, 98, 99, 100];
//var msgstr = "hello";

// user uart
var serial = uart.open({
  id: 'UART2'
});

console.log('start uart test');

// user uart send data
serial.write(msgbuf);

// user uart data receive 
serial.on('data', function(data) {
  console.log('uart receive data is ' + data);
});

// uart close
// serial.close();